@dxos/react-ui-editor 0.7.5-staging.e6154f3 → 0.8.1-main.ae460ac

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -632,13 +632,13 @@ var defaultTheme = {
632
632
 
633
633
  // packages/ui/react-ui-editor/src/defaults.ts
634
634
  var margin = "!mt-[1rem]";
635
- var editorContent = mx3(margin, "!mli-auto w-full max-w-[min(50rem,100%-2rem)]");
635
+ var editorContent = mx3(margin, "!mli-auto w-full max-w-[min(50rem,100%-4rem)]");
636
636
  var editorFullWidth = mx3(margin);
637
- var editorWithToolbarLayout = "grid grid-cols-1 grid-rows-[min-content_1fr] data-[toolbar=disabled]:grid-rows-[1fr] justify-center content-start overflow-hidden";
638
637
  var editorGutter = EditorView.theme({
639
638
  // Match margin from content.
639
+ // Gutter = 2rem + 1rem margin.
640
640
  ".cm-gutters": {
641
- marginTop: "16px",
641
+ marginTop: "1rem",
642
642
  paddingRight: "1rem"
643
643
  }
644
644
  });
@@ -647,6 +647,7 @@ var editorMonospace = EditorView.theme({
647
647
  fontFamily: fontMono
648
648
  }
649
649
  });
650
+ var editorWithToolbarLayout = "grid grid-cols-1 grid-rows-[min-content_1fr] data-[toolbar=disabled]:grid-rows-[1fr] justify-center content-start overflow-hidden";
650
651
 
651
652
  // packages/ui/react-ui-editor/src/extensions/annotations.ts
652
653
  import { StateField } from "@codemirror/state";
@@ -4929,7 +4930,10 @@ var buildDecorations2 = (view, options, focus2) => {
4929
4930
  const level = parseInt(node.name["ATXHeading".length]);
4930
4931
  const headers = getHeaderLevels(node, level);
4931
4932
  if (options.numberedHeadings?.from !== void 0) {
4932
- headers[level - 1].number++;
4933
+ const header = headers[level - 1];
4934
+ if (header) {
4935
+ header.number++;
4936
+ }
4933
4937
  }
4934
4938
  const editing = editingRange(state, node, focus2);
4935
4939
  if (editing) {